<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>24-字符串拆分成数组</title>
	</head>
	<body>
		<script type="text/javascript">
			//数组拆分字符串 toString()、join
			//split按照指定的字符去拆分
			var str = 'red#white#orange';
			var x = str.split('#');
			//Array(3) [ "red", "white", "orange" ]
			console.log(x);
			
			var y = 'abc*bcd*aef';
			console.log(y.split('*'));
			console.log(y.split('%'));//错误的，拆不了
		</script>
	</body>
</html>
